package com.wanchuang.qhbb.adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.wanchuang.qhbb.R;
import com.wanchuang.qhbb.help.GlideHelper;
import com.wanchuang.qhbb.proto.Recharge;

import java.util.List;

public class AccountHeadAdapter extends BaseQuickAdapter<Recharge.My_earnings.wallet_list, BaseViewHolder> implements LoadMoreModule {
    public AccountHeadAdapter(Context context, List<Recharge.My_earnings.wallet_list> dataList) {
        super(R.layout.item_accout_head, dataList);
    }

    @Override
    protected void convert(BaseViewHolder helper, Recharge.My_earnings.wallet_list item) {
        helper.setText(R.id.tv_earn_name,  item.getWalletName())
                .setText(R.id.tv_type,"¥ " + item.getAvailable());
        GlideHelper.INSTANCE.loadImage(helper.getView(R.id.iv_account_logo),item.getWalletImg());
    }

}
